<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改品牌信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-brand-edit" th:object="${purchase}">
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">采购单编号：</label>
                    <div class="col-sm-8">
                        <input name="purId"  class="form-control" type="text" maxlength="30" readonly th:value="*{purId}">
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">采购时间：</label>
                    <div class="col-sm-8">
                        <input name="purTime"   class="form-control"  type="text" readonly  th:value="${#dates.format(purchase.purTime,'yyyy-MM-dd')}">
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">创建人：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" readonly th:value="${purchase.sysUser.userName}" >
                        <input name="sysCreateUserId" class="form-control" type="hidden" readonly th:value="${purchase.sysCreateUserId}" >
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">审核状态：</label>
                    <div class="col-sm-8">
                        <select name="status" class="form-control" maxlength="30" >
                            <option value="">请选择</option>
                            <option value="3"  >审核通过</option>
                            <option value="4"  >审核未通过</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">总金额：</label>
                    <div class="col-sm-8">
                        <input  name="total"  class="form-control" type="text" readonly th:value="${purchase.total}" >
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <label class="col-xs-2 control-label">审核意见：</label>
                    <div class="col-xs-10">
                        <textarea name="opinion" maxlength="500" class="form-control" rows="3"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
    var prefix = ctx + "purchase/check";
    $("#form-brand-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-brand-edit').serialize());
        }
    }
</script>
</body>
</html>